<?php

/**
 * 会员通知
 */

namespace app\member\common;

class NoticeCommon extends \app\member\common\MemberCommon {

    protected function index() {
        $this->setMeta('通知中心');
        $this->pageInfo['name'] = '通知中心';

        $where = [];
        $where['A.user_id'] = $this->userInfo['user_id'];

        $pageLimit = 10;
        $model = target('member/MemberNotice');
        $count = $model->countList($where);
        $pageData = $this->pageData($count, $pageLimit);

        $list = $model->loadList($where, $pageData['limit']);

        $this->assign('page', $pageData['html']);
        $this->assign('pageList', $list);
        $this->memberDisplay();
    }

}